<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
	http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	
	<!-- log4j 的配置信息 /WEB-INF/classes/log4jjavaframe.properties
	classpath:resources/log4j/log4j.properties
	classpath:log4jjavaframe.properties
	 -->
	<context-param>
		<param-name>webAppRootKey</param-name>
		<param-value>javaframe.root</param-value>
	</context-param>
	<context-param>
		<param-name>log4jConfigLocation</param-name>
		<param-value>classpath:log4jjavaframe.properties</param-value>
	</context-param>

	<!-- 常量配置 -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>
			/WEB-INF/classes/applicationContext.xml
			/WEB-INF/classes/applicationContext-domian.xml
			/WEB-INF/classes/applicationContext-action.xml
		</param-value>
	</context-param>

	<!-- 字符串编码过滤 -->
	<filter>
		<filter-name>CharacterEncodingFilter</filter-name>
		<filter-class>
			org.springframework.web.filter.CharacterEncodingFilter
		</filter-class>
		<init-param>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
		<init-param>
			<param-name>forceEncoding</param-name>
			<param-value>true</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>CharacterEncodingFilter</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	<!-- 复合页面 -->
	<filter>
		<description>用于jsp布局过滤器</description>
		<filter-name>sitemesh</filter-name>
		<filter-class>
			com.opensymphony.module.sitemesh.filter.PageFilter
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>sitemesh</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>

	<!-- ActionContextCleanUp 的一个重要作用是整合SiteMesh页面装饰器，它通知FilterDispatcher在正确的时间清除ActionContext中的请求数据。 -->
	<filter>
		<filter-name>struts-cleanup</filter-name>
		<filter-class>
			org.apache.struts2.dispatcher.ActionContextCleanUp
		</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>struts-cleanup</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>


	<filter>
		<filter-name>struts2</filter-name>
		<filter-class>
			org.apache.struts2.dispatcher.FilterDispatcher
		</filter-class>
		<init-param>
			<param-name>config</param-name>
			<param-value>
				struts-default.xml,struts-plugin.xml,/struts.xml
			</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>struts2</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>

	  <!-- log4j监听 -->
	  <listener>
		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
	  </listener>
	<!-- Spring监听 -->
	<listener>
		<listener-class>
			org.springframework.web.context.ContextLoaderListener
		</listener-class>
	</listener>
	<!-- Spring 刷新Introspector防止内存泄露 -->
	<listener>
		<listener-class>
			org.springframework.web.util.IntrospectorCleanupListener
		</listener-class>
	</listener>


	<!-- 数据采集器 -->
	<listener>
		<listener-class>com.qzgf.core.listener.DataCollectionTimerListener</listener-class>
	</listener>
	
	
    <!-- 标签 -->
	<jsp-config>
		<taglib>
			<taglib-uri>/WEB-INF/struts-tags.tld</taglib-uri>
			<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
		</taglib>
	</jsp-config>

	<!-- 验证码begin -->
	<servlet>
		<servlet-name>authimg</servlet-name>
		<servlet-class>com.qzgf.core.servlet.AuthImg</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>authimg</servlet-name>
		<url-pattern>/authimg</url-pattern>
	</servlet-mapping>
	<!-- 验证码end -->
	
	<!-- Ajax begin -->
	<servlet>
		<servlet-name>ajax</servlet-name>
		<servlet-class>com.qzgf.core.servlet.Ajax</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>ajax</servlet-name>
		<url-pattern>/ajax</url-pattern>
	</servlet-mapping>
	<!-- Ajax end -->
	
	<!-- 首页 -->
	<welcome-file-list>
		<welcome-file>login.jsp</welcome-file>
	</welcome-file-list>
</web-app>
